package com.htsk.city.services.core.dao;

import com.htsk.city.services.core.domain.Comment;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;

public interface CommentDao extends JpaRepository<Comment, Long> {

    Page<Comment> findByPostIdAndParentIdAndDelFlag(Long postId, Long parentId,Integer delFlag, Pageable pageable);

    List<Comment> findByPostIdAndParentIdAndDelFlag(Long postId, Long parentId,Integer delFlag);

    Comment findByUserIdAndId(Long userId, Long id);
}
